import request from '@/utils/request'

export default {
  pmList(params) {
    return request({
      url: '/v1/pmsList',
      method: 'get',
      params
    })
  },
  getOne(id) {
    return request({
      url: `/v1/pms/${id}`,
      method: 'get'
    })
  },
  update(data) {
    return request({
      url: '/v1/pmsUpdate',
      method: 'post',
      data
    })
  },
  create(data) {
    return request({
      url: '/v1/pmsAdd',
      method: 'post',
      data
    })
  },
  removeApply(data) {
    return request({
      url: `/v1/pmsRemoveApply`,
      method: 'post',
      data
    })
  },
  removeSure(data) {
    return request({
      url: `/v1/pmsRemoveSure`,
      method: 'post',
      data
    })
  },
  removeNotSure(data) {
    return request({
      url: `/v1/pmsRemoveNotSure`,
      method: 'post',
      data
    })
  },
  delete(id) {
    return request({
      url: `/v1/pmsDel/${id}`,
      method: 'get'
    })
  },
  appendParts(data) {
    return request({
      url: '/v1/workorderAppendParts',
      method: 'post',
      data
    })
  },
  removeParts(data) {
    return request({
      url: '/v1/workorderRemoveParts',
      method: 'post',
      data
    })
  },
  editParts(data) {
    return request({
      url: '/v1/workorderEditParts',
      method: 'post',
      data
    })
  },
  needParts(data) {
    return request({
      url: '/v1/workorderNeedParts',
      method: 'post',
      data
    })
  },
  appendMember(data) {
    return request({
      url: '/v1/workorderAppendMember',
      method: 'post',
      data
    })
  },
  removeMember(data) {
    return request({
      url: '/v1/workorderRemoveMember',
      method: 'post',
      data
    })
  },
  appendTask(data) {
    return request({
      url: '/v1/pmsAppendTask',
      method: 'post',
      data
    })
  },
  removeTask(data) {
    return request({
      url: '/v1/pmsRemoveTask',
      method: 'post',
      data
    })
  },
  appendTime(data) {
    return request({
      url: '/v1/workorderAppendTime',
      method: 'post',
      data
    })
  },
  removeTime(data) {
    return request({
      url: '/v1/workorderRemoveTime',
      method: 'post',
      data
    })
  },
  submitReading(data) {
    return request({
      url: '/v1/pmsSubmitReading',
      method: 'post',
      data
    })
  },
  excel(data) {
    return request({
      url: '/v1/holidayExcel',
      method: 'post',
      data
    })
  },
  monitor(data) {
    return request({
      url: '/v1/pmsMonitorConfirm',
      method: 'post',
      data
    })
  },
  engineer(data) {
    return request({
      url: '/v1/pmsEngineerConfirm',
      method: 'post',
      data
    })
  },
  appendDelay(data) {
    return request({
      url: '/v1/pmsAppendDelay',
      method: 'post',
      data
    })
  },
  removeDelay(data) {
    return request({
      url: '/v1/pmsRemoveDelay',
      method: 'post',
      data
    })
  },
  reviewDelay(data) {
    return request({
      url: '/v1/pmsReviewDelay',
      method: 'post',
      data
    })
  },
  changePmTime(data) {
    return request({
      url: '/v1/changePmsStartTime',
      method: 'post',
      data
    })
  }
}
